#include <stdint.h>
#include "massage_bsp.h"
#include "massage_cfg.h"

#if (MASSAGE_MODE_CONFIG == 1)          /* ALL MASSAGE POSITION */
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
static uint8_t msg_mode1[] = {
	0X1F,
	0X2F,
	0X37,
	0X3B,
	0X3D,
	0X3E
};

static uint8_t msg_mode2[] = {
	0x20,
	0x10,
	0x08,
	0x04,
	0x02,
	0x01
};

static uint8_t msg_mode3[] = {
	0x2A,
	0x15
};

static uint8_t msg_mode4[] = {
	0x3F,
	0
};

static uint8_t msg_mode5[] = {
	0X20,
	0X10,
	0X08,
	0X04,
	0X02,
	0X01,
	0X30,
	0X18,
	0X0C,
	0X06,
	0X03,
	0X21,
	0X38,
	0X1C,
	0X0E,
	0X07,
	0X23,
	0X31,
	0x03,
	0x06,
	0x0C,
	0X18,
	0X30,
	0X21,
	0x01,
	0x02,
	0x04,
	0x08,
	0x10,
	0x20
};

static uint8_t msg_mode6[] = {
	0x3f,
	0x1f,
	0x0f,
	0x07,
	0x03,
	0x01,
	0x20,
	0x30,
	0x38,
	0x3c,
	0x3e,
	0x3f,
	0x11,
	0x36,
	0x27,
	0x08,
	0x31,
	0x36,
	0x27,
	0x08
};

static uint8_t msg_mode7[] = {
	0x30,
	0x18,
	0x0c,
	0x06,
	0x03,
	0x21
};

static uint8_t msg_mode8[] = {
	0x20,
	0x10,
	0x08,
	0x04,
	0x02,
	0x01,
	0x01,
	0x02,
	0x04,
	0x08,
	0x10,
	0x20,
	0x3f,
	0x00,
	0x3f,
	0x00,
	0x3f
};

static uint8_t msg_mode9[] = {
	0x3f
};

static uint8_t msg_mode10[] = {
	0x3f
};
#endif

#if (MASSAGE_MODE_CONFIG == 2)          /* FOOT POSITION MISS */
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
static uint8_t msg_mode1[] = {
	0X1F,
	0X2F,
	0X37,
	0X3B,
	0X3D
};

static uint8_t msg_mode2[] = {
	0x20,
	0x10,
	0x08,
	0x04,
	0x02
};

static uint8_t msg_mode3[] = {
	0x2A,
	0x14
};

static uint8_t msg_mode4[] = {
	0x3E,
	0
};

static uint8_t msg_mode5[] = {
	0X20,
	0X10,
	0X08,
	0X04,
	0X02,
	0X30,
	0X18,
	0X0C,
	0X06,
	0X22,
	0X38,
	0X1C,
	0X0E,
	0X26,
	0X32,
	0x06,
	0x0C,
	0X18,
	0X30,
	0X22,
	0x02,
	0x04,
	0x08,
	0x10,
	0x20
};

static uint8_t msg_mode6[] = {
	0x3e,
	0x1e,
	0x0e,
	0x06,
	0x02,
	0x20,
	0x30,
	0x38,
	0x3c,
	0x3e,
	0x10,
	0x36,
	0x26,
	0x08,
	0x30,
	0x36,
	0x26,
	0x08
};

static uint8_t msg_mode7[] = {
	0x30,
	0x18,
	0x0c,
	0x06,
	0x22
};

static uint8_t msg_mode8[] = {
	0x20,
	0x10,
	0x08,
	0x04,
	0x02,
	0x02,
	0x04,
	0x08,
	0x10,
	0x20,
	0x3e,
	0x00,
	0x3e,
	0x00,
	0x3e
};

static uint8_t msg_mode9[] = {
	0x3e
};

static uint8_t msg_mode10[] = {
	0x3e
};
#endif

#if (MASSAGE_MODE_CONFIG == 3)          /* LEG POSITION MISS */
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
static uint8_t msg_mode1[] = {
	0X1F,
	0X2F,
	0X37,
	0X3B,
	0X3C
};

static uint8_t msg_mode2[] = {
	0x20,
	0x10,
	0x08,
	0x04,
	0x01
};

static uint8_t msg_mode3[] = {
	0x28,
	0x15
};

static uint8_t msg_mode4[] = {
	0x3D,
	0
};

static uint8_t msg_mode5[] = {
	0X20,
	0X10,
	0X08,
	0X04,
	0X01,
	0X30,
	0X18,
	0X0C,
	0X05,
	0X21,
	0X38,
	0X1C,
	0X0D,
	0X25,
	0X31,
	0x05,
	0x0C,
	0X18,
	0X30,
	0X21,
	0x01,
	0x04,
	0x08,
	0x10,
	0x20
};

static uint8_t msg_mode6[] = {
	0x3d,
	0x1d,
	0x0d,
	0x05,
	0x01,
	0x20,
	0x30,
	0x38,
	0x3c,
	0x3d,
	0x11,
	0x34,
	0x25,
	0x08,
	0x31,
	0x34,
	0x25,
	0x08
};

static uint8_t msg_mode7[] = {
	0x30,
	0x18,
	0x0c,
	0x05,
	0x21
};

static uint8_t msg_mode8[] = {
	0x20,
	0x10,
	0x08,
	0x04,
	0x01,
	0x01,
	0x04,
	0x08,
	0x10,
	0x20,
	0x3d,
	0x00,
	0x3d,
	0x00,
	0x3d
};

static uint8_t msg_mode9[] = {
	0x3d
};

static uint8_t msg_mode10[] = {
	0x3d
};
#endif

#if (MASSAGE_MODE_CONFIG == 4)          /* HIP POSITION MISS */
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
static uint8_t msg_mode1[] = {
	0X1F,
	0X2F,
	0X37,
	0X39,
	0X3A
};

static uint8_t msg_mode2[] = {
	0x20,
	0x10,
	0x08,
	0x02,
	0x01
};

static uint8_t msg_mode3[] = {
	0x2A,
	0x11
};

static uint8_t msg_mode4[] = {
	0x3B,
	0
};

static uint8_t msg_mode5[] = {
	0X20,
	0X10,
	0X08,
	0X02,
	0X01,
	0X30,
	0X18,
	0X0A,
	0X03,
	0X21,
	0X38,
	0X1A,
	0X0B,
	0X23,
	0X31,
	0x03,
	0x0A,
	0X18,
	0X30,
	0X21,
	0x01,
	0x02,
	0x08,
	0x10,
	0x20
};

static uint8_t msg_mode6[] = {
	0x3b,
	0x1b,
	0x0b,
	0x03,
	0x01,
	0x20,
	0x30,
	0x38,
	0x3a,
	0x3b,
	0x11,
	0x32,
	0x23,
	0x08,
	0x31,
	0x32,
	0x23,
	0x08
};

static uint8_t msg_mode7[] = {
	0x30,
	0x18,
	0x0a,
	0x03,
	0x21
};

static uint8_t msg_mode8[] = {
	0x20,
	0x10,
	0x08,
	0x02,
	0x01,
	0x01,
	0x02,
	0x08,
	0x10,
	0x20,
	0x3b,
	0x00,
	0x3b,
	0x00,
	0x3b
};

static uint8_t msg_mode9[] = {
	0x3b
};

static uint8_t msg_mode10[] = {
	0x3b
};
#endif

#if (MASSAGE_MODE_CONFIG == 5)          /* LOIN POSITION MISS */
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
static uint8_t msg_mode1[] = {
	0X1F,
	0X2F,
	0X33,
	0X35,
	0X36
};

static uint8_t msg_mode2[] = {
	0x20,
	0x10,
	0x04,
	0x02,
	0x01
};

static uint8_t msg_mode3[] = {
	0x22,
	0x15
};

static uint8_t msg_mode4[] = {
	0x37,
	0
};

static uint8_t msg_mode5[] = {
	0X20,
	0X10,
	0X04,
	0X02,
	0X01,
	0X30,
	0X14,
	0X06,
	0X03,
	0X21,
	0X34,
	0X16,
	0X07,
	0X23,
	0X31,
	0x03,
	0x06,
	0X14,
	0X30,
	0X21,
	0x01,
	0x02,
	0x04,
	0x10,
	0x20
};

static uint8_t msg_mode6[] = {
	0x37,
	0x17,
	0x07,
	0x03,
	0x01,
	0x20,
	0x30,
	0x34,
	0x36,
	0x37,
	0x11,
	0x36,
	0x27,
	0x10,
	0x31,
	0x36,
	0x27,
	0x10
};

static uint8_t msg_mode7[] = {
	0x30,
	0x14,
	0x06,
	0x03,
	0x21
};

static uint8_t msg_mode8[] = {
	0x20,
	0x10,
	0x04,
	0x02,
	0x01,
	0x01,
	0x02,
	0x04,
	0x10,
	0x20,
	0x37,
	0x00,
	0x37,
	0x00,
	0x37
};

static uint8_t msg_mode9[] = {
	0x37
};

static uint8_t msg_mode10[] = {
	0x37
};
#endif

#if (MASSAGE_MODE_CONFIG == 6)          /* BACK POSITION MISS */
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
static uint8_t msg_mode1[] = {
	0X1F,
	0X27,
	0X2B,
	0X2D,
	0X2E
};

static uint8_t msg_mode2[] = {
	0x20,
	0x08,
	0x04,
	0x02,
	0x01
};

static uint8_t msg_mode3[] = {
	0x2A,
	0x05
};

static uint8_t msg_mode4[] = {
	0x2F,
	0
};

static uint8_t msg_mode5[] = {
	0X20,
	0X08,
	0X04,
	0X02,
	0X01,
	0X28,
	0X0C,
	0X06,
	0X03,
	0X21,
	0X2C,
	0X0E,
	0X07,
	0X23,
	0X29,
	0x03,
	0x06,
	0x0C,
	0X28,
	0X21,
	0x01,
	0x02,
	0x04,
	0x08,
	0x20
};

static uint8_t msg_mode6[] = {
	0x2f,
	0x0f,
	0x07,
	0x03,
	0x01,
	0x20,
	0x28,
	0x2c,
	0x2e,
	0x2f,
	0x01,
	0x26,
	0x27,
	0x08,
	0x21,
	0x26,
	0x27,
	0x08
};

static uint8_t msg_mode7[] = {
	0x28,
	0x0c,
	0x06,
	0x03,
	0x21
};

static uint8_t msg_mode8[] = {
	0x20,
	0x08,
	0x04,
	0x02,
	0x01,
	0x01,
	0x02,
	0x04,
	0x08,
	0x20,
	0x2f,
	0x00,
	0x2f,
	0x00,
	0x2f
};

static uint8_t msg_mode9[] = {
	0x2f
};

static uint8_t msg_mode10[] = {
	0x2f
};
#endif

#if (MASSAGE_MODE_CONFIG == 7)          /* HEAD POSITION MISS */
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
static uint8_t msg_mode1[] = {
	0X0F,
	0X17,
	0X1B,
	0X1D,
	0X1E
};

static uint8_t msg_mode2[] = {
	0x10,
	0x08,
	0x04,
	0x02,
	0x01
};

static uint8_t msg_mode3[] = {
	0x0A,
	0x15
};

static uint8_t msg_mode4[] = {
	0x1F,
	0
};

static uint8_t msg_mode5[] = {
	0X10,
	0X08,
	0X04,
	0X02,
	0X01,
	0X18,
	0X0C,
	0X06,
	0X03,
	0X11,
	0X1C,
	0X0E,
	0X07,
	0X13,
	0X19,
	0x03,
	0x06,
	0x0C,
	0X18,
	0X11,
	0x01,
	0x02,
	0x04,
	0x08,
	0x10
};

static uint8_t msg_mode6[] = {
	0x1f,
	0x0f,
	0x07,
	0x03,
	0x01,
	0x10,
	0x18,
	0x1c,
	0x1e,
	0x1f,
	0x11,
	0x16,
	0x07,
	0x08,
	0x11,
	0x16,
	0x07,
	0x08
};

static uint8_t msg_mode7[] = {
	0x18,
	0x0c,
	0x06,
	0x03,
	0x11
};

static uint8_t msg_mode8[] = {
	0x10,
	0x08,
	0x04,
	0x02,
	0x01,
	0x01,
	0x02,
	0x04,
	0x08,
	0x10,
	0x1f,
	0x00,
	0x1f,
	0x00,
	0x1f
};

static uint8_t msg_mode9[] = {
	0x1f
};

static uint8_t msg_mode10[] = {
	0x1f
};
#endif

#if (MASSAGE_MODE_CONFIG == 8)          /* LEG AND FOOT POSITION MISS */
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
static uint8_t msg_mode1[] = {
	0X1C,
	0X2C,
	0X34,
	0X38
};

static uint8_t msg_mode2[] = {
	0x20,
	0x10,
	0x08,
	0x04
};

static uint8_t msg_mode3[] = {
	0x28,
	0x14
};

static uint8_t msg_mode4[] = {
	0x3C,
	0
};

static uint8_t msg_mode5[] = {
	0X20,
	0X10,
	0X08,
	0X04,
	0X30,
	0X18,
	0X0C,
	0X24,
	0X38,
	0X1C,
	0X2C,
	0X34,
	0x0C,
	0X18,
	0X30,
	0X24,
	0x04,
	0x08,
	0x10,
	0x20
};

static uint8_t msg_mode6[] = {
	0x3c,
	0x1c,
	0x0c,
	0x04,
	0x20,
	0x30,
	0x38,
	0x3c,
	0x10,
	0x34,
	0x24,
	0x08,
	0x30,
	0x34,
	0x24,
	0x08
};

static uint8_t msg_mode7[] = {
	0x30,
	0x18,
	0x0c,
	0x24
};

static uint8_t msg_mode8[] = {
	0x20,
	0x10,
	0x08,
	0x04,
	0x04,
	0x08,
	0x10,
	0x20,
	0x3c,
	0x00,
	0x3c,
	0x00,
	0x3c
};

static uint8_t msg_mode9[] = {
	0x3c
};

static uint8_t msg_mode10[] = {
	0x3c
};
#endif

#if (MASSAGE_MODE_CONFIG == 9)          /* HEAD AND FOOT POSITION MISS */
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
static uint8_t msg_mode1[] = {
	0X0E,
	0X16,
	0X1A,
	0X1C
};

static uint8_t msg_mode2[] = {
	0x10,
	0x08,
	0x04,
	0x02
};

static uint8_t msg_mode3[] = {
	0x0A,
	0x14
};

static uint8_t msg_mode4[] = {
	0x1E,
	0
};

static uint8_t msg_mode5[] = {
	0X10,
	0X08,
	0X04,
	0X02,
	0X18,
	0X0C,
	0X06,
	0X12,
	0X1C,
	0X0E,
	0X16,
	0X1A,
	0x06,
	0x0C,
	0X18,
	0X12,
	0x02,
	0x04,
	0x08,
	0x10
};

static uint8_t msg_mode6[] = {
	0x1e,
	0x0e,
	0x06,
	0x02,
	0x10,
	0x18,
	0x1c,
	0x1e,
	0x10,
	0x16,
	0x06,
	0x08,
	0x10,
	0x16,
	0x06,
	0x08
};

static uint8_t msg_mode7[] = {
	0x18,
	0x0c,
	0x06,
	0x12
};

static uint8_t msg_mode8[] = {
	0x10,
	0x08,
	0x04,
	0x02,
	0x02,
	0x04,
	0x08,
	0x10,
	0x1e,
	0x00,
	0x1e,
	0x00,
	0x1e
};

static uint8_t msg_mode9[] = {
	0x1e
};

static uint8_t msg_mode10[] = {
	0x1e
};
#endif

#if (MASSAGE_MODE_CONFIG == 10)         /* HEAD AND LEG POSITION MISS */
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
static uint8_t msg_mode1[] = {
	0X0D,
	0X15,
	0X19,
	0X1C
};

static uint8_t msg_mode2[] = {
	0x10,
	0x08,
	0x04,
	0x01
};

static uint8_t msg_mode3[] = {
	0x08,
	0x15
};

static uint8_t msg_mode4[] = {
	0x1D,
	0
};

static uint8_t msg_mode5[] = {
	0X10,
	0X08,
	0X04,
	0X01,
	0X18,
	0X0C,
	0X05,
	0X11,
	0X1C,
	0X0D,
	0X15,
	0X19,
	0x05,
	0x0C,
	0X18,
	0X11,
	0x01,
	0x04,
	0x08,
	0x10
};

static uint8_t msg_mode6[] = {
	0x1d,
	0x0d,
	0x05,
	0x01,
	0x10,
	0x18,
	0x1c,
	0x1d,
	0x11,
	0x14,
	0x05,
	0x08,
	0x11,
	0x14,
	0x05,
	0x08
};

static uint8_t msg_mode7[] = {
	0x18,
	0x0c,
	0x05,
	0x11
};

static uint8_t msg_mode8[] = {
	0x10,
	0x08,
	0x04,
	0x01,
	0x01,
	0x04,
	0x08,
	0x10,
	0x1d,
	0x00,
	0x1d,
	0x00,
	0x1d
};

static uint8_t msg_mode9[] = {
	0x1d
};

static uint8_t msg_mode10[] = {
	0x1d
};
#endif

#if (MASSAGE_MODE_CONFIG == 11)          /* ALL MASSAGE POSITION */
#define MASSAGE_PLACE_VALUE		0X28
/**
 * @brief:  模式1内可切换状态设置，可通过16进制数设置，马达所对应部位如下：
 *          High  7    6    5    4     3    2    1    0  Low
 *              None  None Head  Back  Loin Hip  Leg  Foot
 *          当将16位进制数中某一位置1时，即表示该状态下所对应的马达部位要振动,置0则不动;没用使用到的部位置0即可。
 *          该模式中一共有6个状态可切换，可视项目要求增减。
 *          没使用到的模式状态保持默认设置即可（下同）。
 */
#if 0
static uint8_t msg_mode1[] = {
	#if (0X1F & (~MASSAGE_PLACE_VALUE))
	(0X1F & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X2F & (~MASSAGE_PLACE_VALUE))
	(0X2F & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X37 & (~MASSAGE_PLACE_VALUE))
	(0X37 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X3B & (~MASSAGE_PLACE_VALUE))
	(0X3B & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X3D & (~MASSAGE_PLACE_VALUE))
	(0X3D & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X3E & (~MASSAGE_PLACE_VALUE))
	(0X3E & (~MASSAGE_PLACE_VALUE))
	#endif
};
#else
static uint8_t msg_mode1[] = {
	0X07,
	0X13,
	0X15,
	0X16,
};
#endif

#if 0
static uint8_t msg_mode2[] = {
	#if (0x20 & (~MASSAGE_PLACE_VALUE))
	(0x20 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x10 & (~MASSAGE_PLACE_VALUE))
	(0x10 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x08 & (~MASSAGE_PLACE_VALUE)),
	(0x08 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x04 & (~MASSAGE_PLACE_VALUE))
	(0x04 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x02 & (~MASSAGE_PLACE_VALUE))
	(0x02 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x01 & (~MASSAGE_PLACE_VALUE))
	(0x01 & (~MASSAGE_PLACE_VALUE))
	#endif
};
#else
static uint8_t msg_mode2[] = {
	0X10,
	0X04,
	0X02,
	0X01,
};
#endif

#if 0
static uint8_t msg_mode3[] = {
	#if (0x2A & (~MASSAGE_PLACE_VALUE))
	(0x2A & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x15 & (~MASSAGE_PLACE_VALUE))
	(0x15 & (~MASSAGE_PLACE_VALUE))
	#endif
};
#else
static uint8_t msg_mode3[] = {
	0x02,
	0x15
};
#endif

#if 0
#if (0x3F & (~MASSAGE_PLACE_VALUE))
static uint8_t msg_mode4[] = {
	(0x3F & (~MASSAGE_PLACE_VALUE)),
	0
};
#endif
#else
static uint8_t msg_mode4[] = {
	0x17,
	0
};
#endif

#if 0
static uint8_t msg_mode5[] = {
	#if (0X20 & (~MASSAGE_PLACE_VALUE))
	(0X20 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X10 & (~MASSAGE_PLACE_VALUE))
	(0X10 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X08 & (~MASSAGE_PLACE_VALUE))
	(0X08 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X04 & (~MASSAGE_PLACE_VALUE))
	(0X04 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X02 & (~MASSAGE_PLACE_VALUE))
	(0X02 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X01 & (~MASSAGE_PLACE_VALUE))
	(0X01 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X30 & (~MASSAGE_PLACE_VALUE))
	(0X30 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X18 & (~MASSAGE_PLACE_VALUE))
	(0X18 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X0C & (~MASSAGE_PLACE_VALUE))
	(0X0C & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X06 & (~MASSAGE_PLACE_VALUE))
	(0X06 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X03 & (~MASSAGE_PLACE_VALUE))
	(0X03 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X21 & (~MASSAGE_PLACE_VALUE))
	(0X21 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X38 & (~MASSAGE_PLACE_VALUE))
	(0X38 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X1C & (~MASSAGE_PLACE_VALUE))
	(0X1C & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X0E & (~MASSAGE_PLACE_VALUE))
	(0X0E & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X07 & (~MASSAGE_PLACE_VALUE))
	(0X07 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X23 & (~MASSAGE_PLACE_VALUE))
	(0X23 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X31 & (~MASSAGE_PLACE_VALUE))
	(0X31 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x03 & (~MASSAGE_PLACE_VALUE))
	(0x03 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x06 & (~MASSAGE_PLACE_VALUE))
	(0x06 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x0C & (~MASSAGE_PLACE_VALUE))
	(0x0C & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X18 & (~MASSAGE_PLACE_VALUE))
	(0X18 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X30 & (~MASSAGE_PLACE_VALUE))
	(0X30 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0X21 & (~MASSAGE_PLACE_VALUE))
	(0X21 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x01 & (~MASSAGE_PLACE_VALUE))
	(0x01 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x02 & (~MASSAGE_PLACE_VALUE))
	(0x02 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x04 & (~MASSAGE_PLACE_VALUE))
	(0x04 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x08 & (~MASSAGE_PLACE_VALUE))
	(0x08 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x10 & (~MASSAGE_PLACE_VALUE))
	(0x10 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x20 & (~MASSAGE_PLACE_VALUE))
	(0x20 & (~MASSAGE_PLACE_VALUE))
	#endif
};
#else
static uint8_t msg_mode5[] = {
	0x10,
	0x04,
	0x02,
	0x01,
	0x14,
	0x06,
	0x03,
	0x11,
	0x16,
	0x07,
	0X13,
	0X15,
	0x03,
	0x06,
	0x14,
	0x11,
	0x01,
	0x02,
	0x04,
	0x10,
};
#endif

#if 0
static uint8_t msg_mode6[] = {
	#if (0x3f & (~MASSAGE_PLACE_VALUE))
	(0x3f & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x3f & (~MASSAGE_PLACE_VALUE))
	(0x3f & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x0f & (~MASSAGE_PLACE_VALUE))
	(0x0f & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x07 & (~MASSAGE_PLACE_VALUE))
	(0x07 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x03 & (~MASSAGE_PLACE_VALUE))
	(0x03 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x01 & (~MASSAGE_PLACE_VALUE))
	(0x01 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x20 & (~MASSAGE_PLACE_VALUE))
	(0x20 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x30 & (~MASSAGE_PLACE_VALUE))
	(0x30 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x38 & (~MASSAGE_PLACE_VALUE))
	(0x38 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x3c & (~MASSAGE_PLACE_VALUE))
	(0x3c & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x3e & (~MASSAGE_PLACE_VALUE))
	(0x3e & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x3f & (~MASSAGE_PLACE_VALUE))
	(0x3f & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x11 & (~MASSAGE_PLACE_VALUE))
	(0x11 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x36 & (~MASSAGE_PLACE_VALUE))
	(0x36 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x27 & (~MASSAGE_PLACE_VALUE))
	(0x27 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x08 & (~MASSAGE_PLACE_VALUE))
	(0x08 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x31 & (~MASSAGE_PLACE_VALUE))
	(0x31 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x36 & (~MASSAGE_PLACE_VALUE))
	(0x36 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x27 & (~MASSAGE_PLACE_VALUE))
	(0x27 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x08 & (~MASSAGE_PLACE_VALUE))
	(0x08 & (~MASSAGE_PLACE_VALUE))
	#endif
};
#else
static uint8_t msg_mode6[] = {
	0x17,
	0x07,
	0x03,
	0x01,
	0x10,
	0x14,
	0x16,
	0x17,
	0x11,
	0x16,
	0x07,
	0x11,
	0x16,
	0x07,
};
#endif

#if 0
static uint8_t msg_mode7[] = {
	#if (0x30 & (~MASSAGE_PLACE_VALUE))
	(0x30 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x18 & (~MASSAGE_PLACE_VALUE))
	(0x18 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x0c & (~MASSAGE_PLACE_VALUE))
	(0x0c & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x06 & (~MASSAGE_PLACE_VALUE))
	(0x06 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x03 & (~MASSAGE_PLACE_VALUE))
	(0x03 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x21 & (~MASSAGE_PLACE_VALUE))
	(0x21 & (~MASSAGE_PLACE_VALUE))
	#endif
};
#else
static uint8_t msg_mode7[] = {
	0x14,
	0x06,
	0x03,
	0x11,
};
#endif

#if 0
static uint8_t msg_mode8[] = {
	#if (0x20 & (~MASSAGE_PLACE_VALUE))
	(0x20 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x10 & (~MASSAGE_PLACE_VALUE))
	(0x10 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x08 & (~MASSAGE_PLACE_VALUE))
	(0x08 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x04 & (~MASSAGE_PLACE_VALUE))
	(0x04 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x02 & (~MASSAGE_PLACE_VALUE))
	(0x02 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x01 & (~MASSAGE_PLACE_VALUE))
	(0x01 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x01 & (~MASSAGE_PLACE_VALUE))
	(0x01 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x02 & (~MASSAGE_PLACE_VALUE))
	(0x02 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x04 & (~MASSAGE_PLACE_VALUE))
	(0x04 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x08 & (~MASSAGE_PLACE_VALUE))
	(0x08 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x10 & (~MASSAGE_PLACE_VALUE))
	(0x10 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x20 & (~MASSAGE_PLACE_VALUE))
	(0x20 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x3f & (~MASSAGE_PLACE_VALUE))
	(0x3f & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x00 & (~MASSAGE_PLACE_VALUE))
	(0x00 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x3f & (~MASSAGE_PLACE_VALUE))
	(0x3f & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x00 & (~MASSAGE_PLACE_VALUE))
	(0x00 & (~MASSAGE_PLACE_VALUE)),
	#endif
	#if (0x3f & (~MASSAGE_PLACE_VALUE))
	(0x3f & (~MASSAGE_PLACE_VALUE))
	#endif
};
#else
static uint8_t msg_mode8[] = {
	0x10,
	0x04,
	0x02,
	0x01,
	0x01,
	0x02,
	0x04,
	0x10,
	0x17,
	0x00,
	0x17,
};
#endif

#if 0
#if (0x3f & (~MASSAGE_PLACE_VALUE))
static uint8_t msg_mode9[] = {
	(0x3f & (~MASSAGE_PLACE_VALUE))
};
#endif
#else
static uint8_t msg_mode9[] = {
	0x17,
};
#endif

#if 0
#if (0x3f & (~MASSAGE_PLACE_VALUE))
static uint8_t msg_mode10[] = {
	(0x3f & (~MASSAGE_PLACE_VALUE))
};
#endif
#else
static uint8_t msg_mode10[] = {
	0x17,
};
#endif
#endif
